package org.shiwen.week3.answer;

public class Circle {
    public static final double PI = 3.14;
    public static void main(String[] args) {
//        System.out.println("半径为1.2的圆的面积为："+ PI*1.2*1.2);
//        System.out.println("半径为2.5的圆的面积为："+ PI*2.5*2.5);
//        System.out.println("半径为6的圆的面积为："+ PI*6*6);
        double radius[] = {1.2,2.5,6};
        for (int i = 0; i < radius.length; i++) {
            System.out.println("半径为"+radius[i]+"的圆的面积为："+PI*radius[i]*radius[i]);
        }
    }
}
